﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using SmartCity.Shared;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;

namespace MetroManagement
{
    /// <summary>
    /// 地铁控制器
    /// </summary>
    [RemoteService]
    [Area("metroManagement")]
    [Route("api/metroManagement/metros")]
    public class MetroController : AbpController, IMetroAppService
    {
        private readonly IMetroAppService _metroAppService;

        public MetroController(
            IMetroAppService metroAppService)
        {
            _metroAppService = metroAppService;
        }

        // 列表
        [HttpGet]
        [Route("list")]
        public Task<ResultResponse<IList<MetroDto>>> ListAsync(string currentName)
        {
            return _metroAppService.ListAsync(currentName);
        }
    }
}